package com.cennavi.minemap.bean;

import java.io.Serializable;
import java.util.List;

public class SoluWithPrefixLayerBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5671543517718053620L;
	private Integer id;
	private String name;
	private String describe;
	private String icon;
	private String createTime;
	private String lastUpdateTime;
	private String publishTime;
	private Integer userId;
	private String template;
	private String center;
	private Double bearing;
	private Double pitch;
	private Integer status;
	private Double zoom;
	private Double minZoom;
	private Double maxZoom;
	private Integer isTemplate;
	private String url;
	
	private List<LayerPrefixTreeWithLayerBean> basic;
	private List<LayerPrefixTreeWithLayerBean> special;
	private UploadSourceAndUploadLayerBean upload;
	
	private List<String> tokens;
	private String config;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(String lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public String getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(String publishTime) {
		this.publishTime = publishTime;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	public String getCenter() {
		return center;
	}

	public void setCenter(String center) {
		this.center = center;
	}

	public Double getBearing() {
		return bearing;
	}

	public void setBearing(Double bearing) {
		this.bearing = bearing;
	}

	public Double getPitch() {
		return pitch;
	}

	public void setPitch(Double pitch) {
		this.pitch = pitch;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Double getZoom() {
		return zoom;
	}

	public void setZoom(Double zoom) {
		this.zoom = zoom;
	}

	public Double getMinZoom() {
		return minZoom;
	}

	public void setMinZoom(Double minZoom) {
		this.minZoom = minZoom;
	}

	public Double getMaxZoom() {
		return maxZoom;
	}

	public void setMaxZoom(Double maxZoom) {
		this.maxZoom = maxZoom;
	}

	public Integer getIsTemplate() {
		return isTemplate;
	}

	public void setIsTemplate(Integer isTemplate) {
		this.isTemplate = isTemplate;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public List<String> getTokens() {
		return tokens;
	}

	public void setTokens(List<String> tokens) {
		this.tokens = tokens;
	}

	public String getConfig() {
		return config;
	}

	public void setConfig(String config) {
		this.config = config;
	}

	public List<LayerPrefixTreeWithLayerBean> getBasic() {
		return basic;
	}

	public void setBasic(List<LayerPrefixTreeWithLayerBean> basic) {
		this.basic = basic;
	}

	public List<LayerPrefixTreeWithLayerBean> getSpecial() {
		return special;
	}

	public void setSpecial(List<LayerPrefixTreeWithLayerBean> special) {
		this.special = special;
	}
	
	public UploadSourceAndUploadLayerBean getUpload() {
		return upload;
	}

	public void setUpload(UploadSourceAndUploadLayerBean upload) {
		this.upload = upload;
	}
	
	public void setUpload(List<SourceBean> sourceBeans, List<LayerBean> layerBeans, List<LayerPrefixBean> layerPrefixBeans) {
		this.upload = new UploadSourceAndUploadLayerBean(sourceBeans, layerBeans, layerPrefixBeans);
	}
	
	

	public SoluWithPrefixLayerBean(SoluBean soluBean){
		this.id             = soluBean.getId()            ;
		this.name           = soluBean.getName()          ;
		this.describe       = soluBean.getDescribe()      ;
		this.icon           = soluBean.getIcon()          ;
		this.createTime     = soluBean.getCreateTime()    ;
		this.lastUpdateTime = soluBean.getLastUpdateTime();
		this.publishTime    = soluBean.getPublishTime()   ;
		this.userId         = soluBean.getUserId()        ;
		this.template       = soluBean.getTemplate()      ;
		this.center         = soluBean.getCenter()        ;
		this.bearing        = soluBean.getBearing()       ;
		this.pitch          = soluBean.getPitch()         ;
		this.status         = soluBean.getStatus()        ;
		this.zoom           = soluBean.getZoom()          ;
		this.minZoom        = soluBean.getMinZoom()       ;
		this.maxZoom        = soluBean.getMaxZoom()       ;
		this.isTemplate     = soluBean.getIsTemplate()    ;
		this.url            = soluBean.getUrl()           ;
		this.tokens         = soluBean.getTokens()        ;
		this.config         = soluBean.getConfig()        ;
	}
	
	class UploadSourceAndUploadLayerBean implements Serializable{
		private static final long serialVersionUID = 1L;
		private List<SourceBean> sources;
		private List<LayerBean> layers;
		private List<LayerPrefixBean> layerPrefixs;
		
		public UploadSourceAndUploadLayerBean(List<SourceBean> sources, List<LayerBean> layers, List<LayerPrefixBean> layerPrefixs){
			this.sources = sources;
			this.layers = layers;
			this.layerPrefixs = layerPrefixs;
		}

		public List<SourceBean> getSources() {
			return sources;
		}

		public void setSources(List<SourceBean> sources) {
			this.sources = sources;
		}

		public List<LayerBean> getLayers() {
			return layers;
		}

		public void setLayers(List<LayerBean> layers) {
			this.layers = layers;
		}

		public List<LayerPrefixBean> getLayerPrefixs() {
			return layerPrefixs;
		}

		public void setLayerPrefixs(List<LayerPrefixBean> layerPrefixs) {
			this.layerPrefixs = layerPrefixs;
		}
	}
}
